const { error } = require('../utils/service');

module.exports = () =>
  async function acl(ctx, next) {
    if (!ctx.session.account || !ctx.session.password) {
      throw error('您未登陆,请先登陆！', 401);
    }
    await next();
  };
